#include <iostream>

using namespace std;

int main()
{
/*    
    int a[5] = {11, 22, 33, 44, 55};
    int* p = a;   // 数组名本身就是该数组在内存中的地址

    for(int i = 0; i < 5; i++) {
        // cout << a[i] << " ";
        // cout << *(a + i) << " ";
        // cout << *(p + i) << " ";
        cout << p[i] << " ";
    }
    
    cout << endl;
*/
    int a = 666;
    int* p = &a;

    // *p = 888;
    
    // 下面两种写法等价
    // p[0] = 888;
    // *(p+0) = 888;
    
    *(p+5) = 888;
    

    cout << "a = " << a << endl;
    
    return 0;
}

